<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://localhost" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost" elementFormDefault="qualified">
	<xs:element name="provider">
		<xs:annotation>
			<xs:documentation xml:lang="ro">Structura datelor de personalizare pentru aplicaţiile de raportare pentru furnizorii de servicii farmaceutice</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="addresses">
					<xs:annotation>
						<xs:documentation xml:lang="ro">Lista de adrese ale furnizorului</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="address" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">Adresa furnizorului</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:attribute name="cityCode" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Localitatea (valoarea codului din nomenclatorul de localităţi)</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="30" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="districtCode" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Judeţul (valoarea codului din nomenclatorul de judeţe)</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="20" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="streetName" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numele străzii</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="255" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="streetNo" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numărul străzii</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="10" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="building" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Blocul / Clădirea</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="10" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="entrance" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Scara / Intrarea</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="10" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="floor" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Etajul</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="10" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="apartment" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Apartamentul / Camera</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="10" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="postalCode" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Codul poştal</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="10" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="contracts">
					<xs:annotation>
						<xs:documentation xml:lang="ro">Lista de contracte</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="contract" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">Datele de identificare ale contractului</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:attribute name="contractNo" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numărul contractului</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="contractDate" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data contractului</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="validFrom" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data de inceput a valabilităţii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="validTo" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data de sfârşit a valabilităţii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="orgUnitCode" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Casa de asigurări cu care s-a încheiat contractul (valoarea codului din nomenclatorul de case de asigurări)</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="20" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="companyCode" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Codul de identificare unic al furnizorului</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="20" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="categoryCode" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Codul categoriei de furnizor</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="contractType" type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Tipul ce contract al furnizorului</xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="employees" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="ro">Lista de angajaţi (medici şi asistenţi)</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="employee" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">Datele de identificare ale angajatului</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element name="specialities" minOccurs="0">
											<xs:annotation>
												<xs:documentation xml:lang="ro">Lista cu specialitatile pe care le are un medic angajat.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:sequence>
													<xs:element name="speciality" minOccurs="0" maxOccurs="unbounded">
														<xs:annotation>
															<xs:documentation xml:lang="ro">Definitia unei specialitati pe care o are un medic angajat.</xs:documentation>
														</xs:annotation>
														<xs:complexType>
															<xs:attribute name="code" use="required">
																<xs:annotation>
																	<xs:documentation xml:lang="ro">Codul specialitatii</xs:documentation>
																</xs:annotation>
																<xs:simpleType>
																	<xs:restriction base="xs:string">
																		<xs:maxLength value="20" />
																	</xs:restriction>
																</xs:simpleType>
															</xs:attribute>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
									<xs:attribute name="pid" type="pidType" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">CNP</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="firstName" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Prenumele persoanei</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="lastName" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Numele de familie persoanei</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="validFrom" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data de inceput a valabilităţii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="validTo" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data de sfârşit a valabilităţii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="stencilNo" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Codul de parafă al medicului</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="6" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="sections" minOccurs="0">
					<xs:annotation>
						<xs:documentation xml:lang="ro">Lista de secţii</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="section" minOccurs="0" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation xml:lang="ro">Datele de identificare ale secţiei</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:attribute name="name" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Denumirea secţiei</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="200" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="deptCode" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Codul intern al departamentului</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="healthDepartmentCode" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Codul departamentrului de sănptate (valoare din nomenclatorul de departamente de sănătate)</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="healthDepartmentType" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Tipul departamentului de sănătate (valoare din nomenclatorul de departamente de sănătate)</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction base="xs:string">
												<xs:maxLength value="40" />
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="validFrom" type="xs:date" use="required">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data de inceput a valabilităţii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="validTo" type="xs:date" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Data de sfârşit a valabilităţii</xs:documentation>
										</xs:annotation>
									</xs:attribute>
									<xs:attribute name="isClinic" type="xs:boolean" use="optional">
										<xs:annotation>
											<xs:documentation xml:lang="ro">Specifică dacă departamentul face parte din ambulatoriul clinic sau nu</xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="code" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Codul de identificare al furnizorului in SIUI</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="20" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="name" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Denumirea furnizorului de servicii</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="100" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="uic" use="required">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Codul unic de identificare al furnizorului (cod fiscal)</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="20" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="uicDate" type="xs:date" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Data de eliberare a codului unic de identificare</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="regNo" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Numărul de înregistrare la Registrul Comerţului</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="20" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="regNoDate" type="xs:date" use="optional">
				<xs:annotation>
					<xs:documentation xml:lang="ro">Data înregistrării la Registrul Comerţului</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="pidType">
		<xs:annotation>
			<xs:documentation xml:lang="ro">Definitia tipului de date folosit pentru CNP</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="13" />
			<xs:minLength value="13" />
			<xs:pattern value="[0-9]{13}" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>